//package com.example.task;
//
//import cn.hutool.json.JSONUtil;
//import com.example.config.webscoket.WebSocket;
//import com.example.dao.*;
//import com.example.model.entity.PocEvent;
//import com.example.model.entity.TEquipment;
//import com.example.model.entity.TEquipmentPart;
//import com.example.model.entity.TPlan;
//import com.example.model.query.TEquipmentPartQuery;
//import com.example.model.vo.SocketVo;
//import com.example.service.SuppliesRealinfoService;
//import com.example.service.SuppliesService;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.scheduling.annotation.Scheduled;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.Resource;
//
//@Component
//@Slf4j
//public class eventPushTask {
//
//    @Resource
//    private WebSocket webSocket;
//    @Autowired
//    private PocEventMapper pocEventMapper;
//    @Scheduled(fixedRate = 15000)//15秒
//
//    public void pushTask() throws Exception {
//        if(webSocket.webSocketSet.size() ==0){
//            return;
//        }
//        PocEvent pocEvent = pocEventMapper.selectById("1351073109312790529");
//        SocketVo vo = new SocketVo();
//        vo.setSource("event");
//        vo.setType("add");
//        vo.setData(JSONUtil.parseObj(pocEvent));
//        webSocket.GroupSending(JSONUtil.toJsonStr(vo));
//    }
//}
//
